home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevMac / CIncludes / Components.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  19.1 KB  |  561 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Components.h
  3.  
  4.      Contains:    Component Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1991-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __COMPONENTS__
  19. #define __COMPONENTS__
  20.  
  21. #ifndef __ERRORS__
  22. #include <Errors.h>
  23. #endif
  24. #ifndef __MACTYPES__
  25. #include <MacTypes.h>
  26. #endif
  27. #ifndef __MIXEDMODE__
  28. #include <MixedMode.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     kAppleManufacturer            = FOUR_CHAR_CODE('appl'),        /* Apple supplied components */
  56.     kComponentResourceType        = FOUR_CHAR_CODE('thng'),        /* a components resource type */
  57.     kComponentAliasResourceType    = FOUR_CHAR_CODE('thga')        /* component alias resource type */
  58. };
  59.  
  60.  
  61. enum {
  62.     kAnyComponentType            = 0,
  63.     kAnyComponentSubType        = 0,
  64.     kAnyComponentManufacturer    = 0,
  65.     kAnyComponentFlagsMask        = 0
  66. };
  67.  
  68.  
  69. enum {
  70.     cmpWantsRegisterMessage        = 1L << 31
  71. };
  72.  
  73.  
  74. enum {
  75.     kComponentOpenSelect        = -1,                            /* ComponentInstance for this open */
  76.     kComponentCloseSelect        = -2,                            /* ComponentInstance for this close */
  77.     kComponentCanDoSelect        = -3,                            /* selector # being queried */
  78.     kComponentVersionSelect        = -4,                            /* no params */
  79.     kComponentRegisterSelect    = -5,                            /* no params */
  80.     kComponentTargetSelect        = -6,                            /* ComponentInstance for top of call chain */
  81.     kComponentUnregisterSelect    = -7,                            /* no params */
  82.     kComponentGetMPWorkFunctionSelect = -8                        /* some params */
  83. };
  84.  
  85. /* Component Resource Extension flags */
  86.  
  87. enum {
  88.     componentDoAutoVersion        = (1 << 0),
  89.     componentWantsUnregister    = (1 << 1),
  90.     componentAutoVersionIncludeFlags = (1 << 2),
  91.     componentHasMultiplePlatforms = (1 << 3),
  92.     componentLoadResident        = (1 << 4)
  93. };
  94.  
  95.  
  96.  
  97. /* Set Default Component flags */
  98.  
  99. enum {
  100.     defaultComponentIdentical    = 0,
  101.     defaultComponentAnyFlags    = 1,
  102.     defaultComponentAnyManufacturer = 2,
  103.     defaultComponentAnySubType    = 4,
  104.     defaultComponentAnyFlagsAnyManufacturer = (defaultComponentAnyFlags + defaultComponentAnyManufacturer),
  105.     defaultComponentAnyFlagsAnyManufacturerAnySubType = (defaultComponentAnyFlags + defaultComponentAnyManufacturer + defaultComponentAnySubType)
  106. };
  107.  
  108. /* RegisterComponentResource flags */
  109.  
  110. enum {
  111.     registerComponentGlobal        = 1,
  112.     registerComponentNoDuplicates = 2,
  113.     registerComponentAfterExisting = 4,
  114.     registerComponentAliasesOnly = 8
  115. };
  116.  
  117.  
  118.  
  119. struct ComponentDescription {
  120.     OSType                             componentType;                /* A unique 4-byte code indentifying the command set */
  121.     OSType                             componentSubType;            /* Particular flavor of this instance */
  122.     OSType                             componentManufacturer;        /* Vendor indentification */
  123.     unsigned long                     componentFlags;                /* 8 each for Component,Type,SubType,Manuf/revision */
  124.     unsigned long                     componentFlagsMask;            /* Mask for specifying which flags to consider in search, zero during registration */
  125. };
  126. typedef struct ComponentDescription        ComponentDescription;
  127.  
  128.  
  129. struct ResourceSpec {
  130.     OSType                             resType;                    /* 4-byte code  */
  131.     short                             resID;                        /*              */
  132. };
  133. typedef struct ResourceSpec                ResourceSpec;
  134.  
  135. struct ComponentResource {
  136.     ComponentDescription             cd;                            /* Registration parameters */
  137.     ResourceSpec                     component;                    /* resource where Component code is found */
  138.     ResourceSpec                     componentName;                /* name string resource */
  139.     ResourceSpec                     componentInfo;                /* info string resource */
  140.     ResourceSpec                     componentIcon;                /* icon resource */
  141. };
  142. typedef struct ComponentResource        ComponentResource;
  143. typedef ComponentResource *                ComponentResourcePtr;
  144. typedef ComponentResourcePtr *            ComponentResourceHandle;
  145.  
  146. struct ComponentPlatformInfo {
  147.     long                             componentFlags;                /* flags of Component */
  148.     ResourceSpec                     component;                    /* resource where Component code is found */
  149.     short                             platformType;                /* gestaltSysArchitecture result */
  150. };
  151. typedef struct ComponentPlatformInfo    ComponentPlatformInfo;
  152.  
  153. struct ComponentResourceExtension {
  154.     long                             componentVersion;            /* version of Component */
  155.     long                             componentRegisterFlags;        /* flags for registration */
  156.     short                             componentIconFamily;        /* resource id of Icon Family */
  157. };
  158. typedef struct ComponentResourceExtension ComponentResourceExtension;
  159.  
  160. struct ComponentPlatformInfoArray {
  161.     long                             count;
  162.     ComponentPlatformInfo             platformArray[1];
  163. };
  164. typedef struct ComponentPlatformInfoArray ComponentPlatformInfoArray;
  165.  
  166. struct ExtComponentResource {
  167.     ComponentDescription             cd;                            /* registration parameters */
  168.     ResourceSpec                     component;                    /* resource where Component code is found */
  169.     ResourceSpec                     componentName;                /* name string resource */
  170.     ResourceSpec                     componentInfo;                /* info string resource */
  171.     ResourceSpec                     componentIcon;                /* icon resource */
  172.     long                             componentVersion;            /* version of Component */
  173.     long                             componentRegisterFlags;        /* flags for registration */
  174.     short                             componentIconFamily;        /* resource id of Icon Family */
  175.     long                             count;                        /* elements in platformArray */
  176.     ComponentPlatformInfo             platformArray[1];
  177. };
  178. typedef struct ExtComponentResource        ExtComponentResource;
  179.  
  180. struct ComponentAliasResource {
  181.     ComponentResource                 cr;                            /* Registration parameters */
  182.     ComponentDescription             aliasCD;                    /* component alias description */
  183. };
  184. typedef struct ComponentAliasResource    ComponentAliasResource;
  185. /*  Structure received by Component:        */
  186.  
  187. struct ComponentParameters {
  188.     UInt8                             flags;                        /* call modifiers: sync/async, deferred, immed, etc */
  189.     UInt8                             paramSize;                    /* size in bytes of actual parameters passed to this call */
  190.     short                             what;                        /* routine selector, negative for Component management calls */
  191.     long                             params[1];                    /* actual parameters for the indicated routine */
  192. };
  193. typedef struct ComponentParameters        ComponentParameters;
  194.  
  195. struct ComponentRecord {
  196.     long                             data[1];
  197. };
  198. typedef struct ComponentRecord            ComponentRecord;
  199.  
  200. typedef ComponentRecord *                Component;
  201.  
  202. struct ComponentInstanceRecord {
  203.     long                             data[1];
  204. };
  205. typedef struct ComponentInstanceRecord    ComponentInstanceRecord;
  206.  
  207. typedef ComponentInstanceRecord *        ComponentInstance;
  208.  
  209. struct RegisteredComponentRecord {
  210.     long                             data[1];
  211. };
  212. typedef struct RegisteredComponentRecord RegisteredComponentRecord;
  213.  
  214. struct RegisteredComponentInstanceRecord {
  215.     long                             data[1];
  216. };
  217. typedef struct RegisteredComponentInstanceRecord RegisteredComponentInstanceRecord;
  218. typedef RegisteredComponentInstanceRecord * RegisteredComponentInstanceRecordPtr;
  219.  
  220. typedef long                             ComponentResult;
  221.  
  222. enum {
  223.     platform68k                    = 1,                            /* platform type (response from gestaltSysArchitecture) */
  224.     platformPowerPC                = 2,
  225.     platformInterpreted            = 3,
  226.     platformWin32                = 4
  227. };
  228.  
  229.  
  230. enum {
  231.     mpWorkFlagDoWork            = (1 << 0),
  232.     mpWorkFlagDoCompletion        = (1 << 1),
  233.     mpWorkFlagCopyWorkBlock        = (1 << 2),
  234.     mpWorkFlagDontBlock            = (1 << 3),
  235.     mpWorkFlagGetProcessorCount    = (1 << 4),
  236.     mpWorkFlagGetIsRunning        = (1 << 6)
  237. };
  238.  
  239.  
  240. struct ComponentMPWorkFunctionHeaderRecord {
  241.     UInt32                             headerSize;
  242.     UInt32                             recordSize;
  243.     UInt32                             workFlags;
  244.     UInt16                             processorCount;
  245.     UInt8                             unused;
  246.     UInt8                             isRunning;
  247. };
  248. typedef struct ComponentMPWorkFunctionHeaderRecord ComponentMPWorkFunctionHeaderRecord;
  249. typedef ComponentMPWorkFunctionHeaderRecord * ComponentMPWorkFunctionHeaderRecordPtr;
  250. typedef CALLBACK_API( ComponentResult , ComponentMPWorkFunctionProcPtr )(void *globalRefCon, ComponentMPWorkFunctionHeaderRecordPtr header);
  251. typedef CALLBACK_API( ComponentResult , ComponentRoutineProcPtr )(ComponentParameters *cp, Handle componentStorage);
  252. typedef STACK_UPP_TYPE(ComponentMPWorkFunctionProcPtr)             ComponentMPWorkFunctionUPP;
  253. typedef STACK_UPP_TYPE(ComponentRoutineProcPtr)                 ComponentRoutineUPP;
  254. /*
  255.     The parameter list for each ComponentFunction is unique. It is
  256.     therefore up to users to create the appropriate procInfo for their
  257.     own ComponentFunctions where necessary.
  258. */
  259.  
  260. typedef UniversalProcPtr                 ComponentFunctionUPP;
  261. #if TARGET_RT_MAC_CFM
  262. /* 
  263.     CallComponentUPP is a global variable exported from InterfaceLib.
  264.     It is the ProcPtr passed to CallUniversalProc to manually call a component function.
  265. */
  266. extern UniversalProcPtr CallComponentUPP;
  267. #endif
  268.  
  269. #define ComponentCallNow( callNumber, paramSize ) \
  270.     FIVEWORDINLINE( 0x2F3C,paramSize,callNumber,0x7000,0xA82A )
  271.  
  272. /********************************************************
  273. *                                                        *
  274. *                  APPLICATION LEVEL CALLS                    *
  275. *                                                        *
  276. ********************************************************/
  277. /********************************************************
  278. * Component Database Add, Delete, and Query Routines
  279. ********************************************************/
  280. EXTERN_API( Component )
  281. RegisterComponent                (ComponentDescription *    cd,
  282.                                  ComponentRoutineUPP     componentEntryPoint,
  283.                                  short                     global,
  284.                                  Handle                 componentName,
  285.                                  Handle                 componentInfo,
  286.                                  Handle                 componentIcon)                        TWOWORDINLINE(0x7001, 0xA82A);
  287.  
  288. EXTERN_API( Component )
  289. RegisterComponentResource        (ComponentResourceHandle  cr,
  290.                                  short                     global)                                TWOWORDINLINE(0x7012, 0xA82A);
  291.  
  292. EXTERN_API( OSErr )
  293. UnregisterComponent                (Component                 aComponent)                            TWOWORDINLINE(0x7002, 0xA82A);
  294.  
  295. EXTERN_API( Component )
  296. FindNextComponent                (Component                 aComponent,
  297.                                  ComponentDescription *    looking)                            TWOWORDINLINE(0x7004, 0xA82A);
  298.  
  299. EXTERN_API( long )
  300. CountComponents                    (ComponentDescription *    looking)                            TWOWORDINLINE(0x7003, 0xA82A);
  301.  
  302. EXTERN_API( OSErr )
  303. GetComponentInfo                (Component                 aComponent,
  304.                                  ComponentDescription *    cd,
  305.                                  Handle                 componentName,
  306.                                  Handle                 componentInfo,
  307.                                  Handle                 componentIcon)                        TWOWORDINLINE(0x7005, 0xA82A);
  308.  
  309. EXTERN_API( long )
  310. GetComponentListModSeed            (void)                                                        TWOWORDINLINE(0x7006, 0xA82A);
  311.  
  312. EXTERN_API( long )
  313. GetComponentTypeModSeed            (OSType                 componentType)                        TWOWORDINLINE(0x702C, 0xA82A);
  314.  
  315. /********************************************************
  316. * Component Instance Allocation and dispatch routines
  317. ********************************************************/
  318. EXTERN_API( OSErr )
  319. OpenAComponent                    (Component                 aComponent,
  320.                                  ComponentInstance *    ci)                                    TWOWORDINLINE(0x702D, 0xA82A);
  321.  
  322. EXTERN_API( ComponentInstance )
  323. OpenComponent                    (Component                 aComponent)                            TWOWORDINLINE(0x7007, 0xA82A);
  324.  
  325. EXTERN_API( OSErr )
  326. CloseComponent                    (ComponentInstance         aComponentInstance)                    TWOWORDINLINE(0x7008, 0xA82A);
  327.  
  328. EXTERN_API( OSErr )
  329. GetComponentInstanceError        (ComponentInstance         aComponentInstance)                    TWOWORDINLINE(0x700A, 0xA82A);
  330.  
  331. /********************************************************
  332. *                                                        *
  333. *                      CALLS MADE BY COMPONENTS              *
  334. *                                                        *
  335. ********************************************************/
  336. /********************************************************
  337. * Component Management routines
  338. ********************************************************/
  339. EXTERN_API( void )
  340. SetComponentInstanceError        (ComponentInstance         aComponentInstance,
  341.                                  OSErr                     theError)                            TWOWORDINLINE(0x700B, 0xA82A);
  342.  
  343. EXTERN_API( long )
  344. GetComponentRefcon                (Component                 aComponent)                            TWOWORDINLINE(0x7010, 0xA82A);
  345.  
  346. EXTERN_API( void )
  347. SetComponentRefcon                (Component                 aComponent,
  348.                                  long                     theRefcon)                            TWOWORDINLINE(0x7011, 0xA82A);
  349.  
  350. EXTERN_API( short )
  351. OpenComponentResFile            (Component                 aComponent)                            TWOWORDINLINE(0x7015, 0xA82A);
  352.  
  353. EXTERN_API( OSErr )
  354. OpenAComponentResFile            (Component                 aComponent,
  355.                                  short *                resRef)                                TWOWORDINLINE(0x702F, 0xA82A);
  356.  
  357. EXTERN_API( OSErr )
  358. CloseComponentResFile            (short                     refnum)                                TWOWORDINLINE(0x7018, 0xA82A);
  359.  
  360. EXTERN_API( OSErr )
  361. GetComponentResource            (Component                 aComponent,
  362.                                  OSType                 resType,
  363.                                  short                     resID,
  364.                                  Handle *                theResource)                        TWOWORDINLINE(0x7035, 0xA82A);
  365.  
  366. EXTERN_API( OSErr )
  367. GetComponentIndString            (Component                 aComponent,
  368.                                  Str255                 theString,
  369.                                  short                     strListID,
  370.                                  short                     index)                                TWOWORDINLINE(0x7036, 0xA82A);
  371.  
  372. EXTERN_API( Component )
  373. ResolveComponentAlias            (Component                 aComponent)                            TWOWORDINLINE(0x7020, 0xA82A);
  374.  
  375. /********************************************************
  376. * Component Instance Management routines
  377. ********************************************************/
  378. EXTERN_API( Handle )
  379. GetComponentInstanceStorage        (ComponentInstance         aComponentInstance)                    TWOWORDINLINE(0x700C, 0xA82A);
  380.  
  381. EXTERN_API( void )
  382. SetComponentInstanceStorage        (ComponentInstance         aComponentInstance,
  383.                                  Handle                 theStorage)                            TWOWORDINLINE(0x700D, 0xA82A);
  384.  
  385. EXTERN_API( long )
  386. GetComponentInstanceA5            (ComponentInstance         aComponentInstance)                    TWOWORDINLINE(0x700E, 0xA82A);
  387.  
  388. EXTERN_API( void )
  389. SetComponentInstanceA5            (ComponentInstance         aComponentInstance,
  390.                                  long                     theA5)                                TWOWORDINLINE(0x700F, 0xA82A);
  391.  
  392. EXTERN_API( long )
  393. CountComponentInstances            (Component                 aComponent)                            TWOWORDINLINE(0x7013, 0xA82A);
  394.  
  395. /* useful helper routines for convenient method dispatching */
  396. EXTERN_API( long )
  397. CallComponentFunction            (ComponentParameters *    params,
  398.                                  ComponentFunctionUPP     func)                                TWOWORDINLINE(0x70FF, 0xA82A);
  399.  
  400. EXTERN_API( long )
  401. CallComponentFunctionWithStorage (Handle                 storage,
  402.                                  ComponentParameters *    params,
  403.                                  ComponentFunctionUPP     func)                                TWOWORDINLINE(0x70FF, 0xA82A);
  404.  
  405. #if TARGET_CPU_PPC && TARGET_OS_MAC
  406. EXTERN_API( long )
  407. CallComponentFunctionWithStorageProcInfo (Handle         storage,
  408.                                  ComponentParameters *    params,
  409.                                  ProcPtr                 func,
  410.                                  long                     funcProcInfo);
  411.  
  412. #else
  413. #define CallComponentFunctionWithStorageProcInfo(storage, params, func, funcProcInfo ) CallComponentFunctionWithStorage(storage, params, func)
  414.  
  415. #endif  /* TARGET_CPU_PPC && TARGET_OS_MAC */
  416.  
  417. EXTERN_API( long )
  418. DelegateComponentCall            (ComponentParameters *    originalParams,
  419.                                  ComponentInstance         ci)                                    TWOWORDINLINE(0x7024, 0xA82A);
  420.  
  421. EXTERN_API( OSErr )
  422. SetDefaultComponent                (Component                 aComponent,
  423.                                  short                     flags)                                TWOWORDINLINE(0x701E, 0xA82A);
  424.  
  425. EXTERN_API( ComponentInstance )
  426. OpenDefaultComponent            (OSType                 componentType,
  427.                                  OSType                 componentSubType)                    TWOWORDINLINE(0x7021, 0xA82A);
  428.  
  429. EXTERN_API( OSErr )
  430. OpenADefaultComponent            (OSType                 componentType,
  431.                                  OSType                 componentSubType,
  432.                                  ComponentInstance *    ci)                                    TWOWORDINLINE(0x702E, 0xA82A);
  433.  
  434. EXTERN_API( Component )
  435. CaptureComponent                (Component                 capturedComponent,
  436.                                  Component                 capturingComponent)                    TWOWORDINLINE(0x701C, 0xA82A);
  437.  
  438. EXTERN_API( OSErr )
  439. UncaptureComponent                (Component                 aComponent)                            TWOWORDINLINE(0x701D, 0xA82A);
  440.  
  441. EXTERN_API( long )
  442. RegisterComponentResourceFile    (short                     resRefNum,
  443.                                  short                     global)                                TWOWORDINLINE(0x7014, 0xA82A);
  444.  
  445. EXTERN_API( OSErr )
  446. GetComponentIconSuite            (Component                 aComponent,
  447.                                  Handle *                iconSuite)                            TWOWORDINLINE(0x7029, 0xA82A);
  448.  
  449.  
  450. /********************************************************
  451. *                                                        *
  452. *              Direct calls to the Components                *
  453. *                                                        *
  454. ********************************************************/
  455. /* Old style names*/
  456.  
  457. EXTERN_API( long )
  458. ComponentFunctionImplemented    (ComponentInstance         ci,
  459.                                  short                     ftnNumber)                            FIVEWORDINLINE(0x2F3C, 0x0002, 0xFFFD, 0x7000, 0xA82A);
  460.  
  461. EXTERN_API( long )
  462. GetComponentVersion                (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFC, 0x7000, 0xA82A);
  463.  
  464. EXTERN_API( long )
  465. ComponentSetTarget                (ComponentInstance         ci,
  466.                                  ComponentInstance         target)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFA, 0x7000, 0xA82A);
  467.  
  468. /* New style names*/
  469.  
  470. EXTERN_API( ComponentResult )
  471. CallComponentOpen                (ComponentInstance         ci,
  472.                                  ComponentInstance         self)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFF, 0x7000, 0xA82A);
  473.  
  474. EXTERN_API( ComponentResult )
  475. CallComponentClose                (ComponentInstance         ci,
  476.                                  ComponentInstance         self)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFE, 0x7000, 0xA82A);
  477.  
  478. EXTERN_API( ComponentResult )
  479. CallComponentCanDo                (ComponentInstance         ci,
  480.                                  short                     ftnNumber)                            FIVEWORDINLINE(0x2F3C, 0x0002, 0xFFFD, 0x7000, 0xA82A);
  481.  
  482. EXTERN_API( ComponentResult )
  483. CallComponentVersion            (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFC, 0x7000, 0xA82A);
  484.  
  485. EXTERN_API( ComponentResult )
  486. CallComponentRegister            (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFB, 0x7000, 0xA82A);
  487.  
  488. EXTERN_API( ComponentResult )
  489. CallComponentTarget                (ComponentInstance         ci,
  490.                                  ComponentInstance         target)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFA, 0x7000, 0xA82A);
  491.  
  492. EXTERN_API( ComponentResult )
  493. CallComponentUnregister            (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFF9, 0x7000, 0xA82A);
  494.  
  495. EXTERN_API( ComponentResult )
  496. CallComponentGetMPWorkFunction    (ComponentInstance         ci,
  497.                                  ComponentMPWorkFunctionUPP * workFunction,
  498.                                  void **                refCon)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0xFFF8, 0x7000, 0xA82A);
  499.  
  500.  
  501. #if !TARGET_OS_MAC
  502. /* 
  503.         CallComponent is used by ComponentGlue routines to manually call a component function.
  504.      */
  505. EXTERN_API( ComponentResult )
  506. CallComponent                    (ComponentInstance         ci,
  507.                                  ComponentParameters *    cp);
  508.  
  509. #endif  /*  !TARGET_OS_MAC */
  510.  
  511. /* UPP call backs */
  512. enum { uppComponentMPWorkFunctionProcInfo = 0x000003F0 };         /* pascal 4_bytes Func(4_bytes, 4_bytes) */
  513. enum { uppComponentRoutineProcInfo = 0x000003F0 };                 /* pascal 4_bytes Func(4_bytes, 4_bytes) */
  514. #define NewComponentMPWorkFunctionProc(userRoutine)             (ComponentMPWorkFunctionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppComponentMPWorkFunctionProcInfo, GetCurrentArchitecture())
  515. #define NewComponentRoutineProc(userRoutine)                     (ComponentRoutineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppComponentRoutineProcInfo, GetCurrentArchitecture())
  516. #define CallComponentMPWorkFunctionProc(userRoutine, globalRefCon, header)  CALL_TWO_PARAMETER_UPP((userRoutine), uppComponentMPWorkFunctionProcInfo, (globalRefCon), (header))
  517. #define CallComponentRoutineProc(userRoutine, cp, componentStorage)  CALL_TWO_PARAMETER_UPP((userRoutine), uppComponentRoutineProcInfo, (cp), (componentStorage))
  518. /* ProcInfos */
  519.  
  520. /* MixedMode ProcInfo constants for component calls */
  521. enum {
  522.     uppComponentFunctionImplementedProcInfo            = 0x000002F0,
  523.     uppGetComponentVersionProcInfo                    = 0x000000F0,
  524.     uppComponentSetTargetProcInfo                    = 0x000003F0,
  525.     uppCallComponentOpenProcInfo                    = 0x000003F0,
  526.     uppCallComponentCloseProcInfo                    = 0x000003F0,
  527.     uppCallComponentCanDoProcInfo                    = 0x000002F0,
  528.     uppCallComponentVersionProcInfo                    = 0x000000F0,
  529.     uppCallComponentRegisterProcInfo                = 0x000000F0,
  530.     uppCallComponentTargetProcInfo                    = 0x000003F0,
  531.     uppCallComponentUnregisterProcInfo                = 0x000000F0,
  532.     uppCallComponentGetMPWorkFunctionProcInfo        = 0x00000FF0
  533. };
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541. #if PRAGMA_STRUCT_ALIGN
  542.     #pragma options align=reset
  543. #elif PRAGMA_STRUCT_PACKPUSH
  544.     #pragma pack(pop)
  545. #elif PRAGMA_STRUCT_PACK
  546.     #pragma pack()
  547. #endif
  548.  
  549. #ifdef PRAGMA_IMPORT_OFF
  550. #pragma import off
  551. #elif PRAGMA_IMPORT
  552. #pragma import reset
  553. #endif
  554.  
  555. #ifdef __cplusplus
  556. }
  557. #endif
  558.  
  559. #endif /* __COMPONENTS__ */
  560.  
  561.